package com.sptpc.demo.repository;

import com.sptpc.demo.model.Drink;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface DrinkRepository extends JpaRepository<Drink, Integer> {
    // sql: select * from t_drink where category_id = id
    // select * from t_category where id = id
    List<Drink> findDrinksByCategory_Id(Integer id);

    // List<Drink> findDrinksByNameLike(String key);
}
